package com.ccc.test.mq.receive;

import cn.hutool.json.JSONUtil;
import com.ccc.test.common.pojo.ImgDTO;
import com.ccc.test.mq.sink.MsgSink;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;

/**
 * @author superC
 * @version 1.0.0
 * @date 2022/7/18
 */

//@EnableBinding(MsgSink.class)
public class MsgReceive {

//    @StreamListener(MsgSink.IMG_INPUT)
    public void receiveImg(String msg) {

        ImgDTO imgDTO = JSONUtil.toBean(msg, ImgDTO.class);
        System.out.println("接收图片名称为:" + imgDTO.getFileName());

    }

}